{extend name="adminblue/base" /}
{block name="resources"}
<style>
.rank-box {}
.rank-nav {font-size: 16px;height: 25px;line-height: 25px;padding-left: 10px;}
.rank-ul li {padding: 10px;margin-top: 15px;background-color: #ffffff;border: 1px solid #e5e5e5;border-left:0;border-right:0;transition:background 0.3s;cursor:pointer;}
.rank-ul li:hover {background-color: #F9F9F9;}
.rank-ul li table{width:100%}
.rank-ul li table tr td {height: 34px;line-height: 34px;}
.rank-ul li table tr td:nth-child(1) {width: 40px;text-align: center;}
.rank-ul li table tr td:nth-child(2) {width: 250px;text-align: left;padding-left: 20px;font-size: 13px;max-width: 220px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.rank-ul li table tr td:nth-child(3) {width: 160px;text-align: center;}
.rank-img {height: 34px;}
.first{color: #F44336;font-weight: bold;font-size: 19px;}
.second{color:#FF9800;font-weight: bold;font-size: 17px;}
.third{color:#03A9F4;font-weight: bold;font-size: 15px;}
</style>
{/block}
{block name="main"}
<div class="space-10"></div>
<table class="table-class">
	<colgroup>
		<col style="width: 2%;">
		<col style="width: 5%;">
		<col style="width: 31%;">
		<col style="width: 31%;">
		<col style="width: 31%;">
	</colgroup>
	<thead>
		<tr>
			<th align="center"><i class="checkbox-common"><input type="checkbox" onclick="CheckAll(this)"></i></th>
			<th align="left">排行</th>
			<th align="left">商品名称</th>
			<th align="right"></th>
			<th align="right">销售量<span class="row-30"></span></th>
		</tr>
	</thead>
	<tbody>
	
	{foreach $goods_list as $k=>$goods_info}
			
				<tr>
				    <td  style="text-align: center;"><i class="checkbox-common"><input name="sub" type="checkbox" value="" ></i></td>
					<td align="left">
						{if condition="$k eq 0"}
						<span class="first">{$k + 1}</span>
						{elseif condition="$k eq 1"/}
						<span class="second">{$k + 1}</span>
						{elseif condition="$k eq 2"/}
						<span class="third">{$k + 1}</span>
						{else/}
						<span>{$k + 1}</span>
						{/if}
					</td>
					<td ><a href="ADMIN_MAIN/account/shopgoodsaccountlist?goods_id={$goods_info.goods_id}" title="{$goods_info.goods_name}" style="margin-left:0px;">{$goods_info.goods_name}</a></td>
					<td  align="right">
						{if condition="$k eq 0"}
						<img class="rank-img" src="ADMIN_IMG/firat_sale.png" />
						{elseif condition="$k eq 1"/}
						<img class="rank-img" src="ADMIN_IMG/second_sale.png" />
						{elseif condition="$k eq 2"/}
						<img class="rank-img" src="ADMIN_IMG/third_sale.png" />
						{/if}
					</td>
					<td  align="right">
						{if condition="$k eq 0"}
						<span class="first">{$goods_info.real_sales}</span>
						{elseif condition="$k eq 1"/}
						<span class="second">{$goods_info.real_sales}</span>
						{elseif condition="$k eq 2"/}
						<span class="third">{$goods_info.real_sales}</span>
						{else/}
						<span>{$goods_info.real_sales}</span>
						{/if}
						<span class="row-30"></span>
					</td>
				</tr>

		{/foreach}
	
	
	
	</tbody>
</table>
{/block}
{block name="script"}
<script type="text/javascript">
function CheckAll(event){
	var checked = event.checked;
	$("#productTbody input[type = 'checkbox']").prop("checked",checked);
	if(checked) $(".table-class tbody input[type = 'checkbox']").parent().addClass("selected");
	else $(".table-class tbody input[type = 'checkbox']").parent().removeClass("selected");
}

</script>


{/block}